#include <stdio.h>
#include <stdlib.h>
#include <math.h>

/* We map each point (island) to a closed interval on the x-axis (coast).
 * The island is reachable from a radar if and only if the radar's center
 * is within this interval.
 */
typedef struct Interval { double left, right; } Interval;

/* Compares two intervals by their right point. */
static int interval_comparer(const Interval *a, const Interval *b)
{
    double diff = a->right - b->right;
    return (diff < 0.0)? -1 : (diff > 0.0)? 1 : 0;
}

#define MAX_ISLANDS 1000
static Interval intervals[MAX_ISLANDS];

/* Returns the minimum number of radars needed to cover n islands. */
int solve(int n)
{
    int i, needed;
    double last_pos;    /* x-value of last radar */

    if (n == 0)
        return 0;

    /* Sort the intervals by their right end. */
    qsort(intervals, n, sizeof(Interval), interval_comparer);
    needed = 1;
    last_pos = intervals[0].right;
    for (i = 1; i < n; i++)
    {
        if (intervals[i].left > last_pos) /* new radar needed */
        {
            ++needed;
            last_pos = intervals[i].right;
        }
    }
    return needed;
}

int main()
{
    int n;  /* number of islands */
    int r;  /* radius */
    int t;
    for (t = 1; scanf("%d %d", &n, &r) == 2 && !(n == 0 && r == 0); t++)
    {
        int i, too_far = 0, needed = 0;
        for (i = 0; i < n; i++)
        {
            int x, y;
            scanf("%d %d", &x, &y);
            if (y > r) /* too far away */
                too_far = 1;
            else
            {
                double h = sqrt((double)r*r - (double)y*y);
                intervals[i].left = x - h;
                intervals[i].right = x + h;
            }
        }
        if (too_far)
            needed = -1;
        else
            needed = solve(n);
        printf("Case %d: %d\n", t, needed);
    }
    return 0;
}
